<template>
  <div class="cmt-floor">
    <div class="cmt-content">
      <div class="cmt-info">管理员 <i>2020-10-12 3:59</i> <span>1</span></div>
    </div>
    <p class="cmt-message">{{ data[0].content }}</p>
    <el-row type="flex">
      <div class="cmt-pic" v-if="data[0].img">
        <img
          src="http://157.122.54.189:9095/uploads/5f132f8551d946d6abbf7c4152365f4c.jpg"
          alt=""
        />
      </div>
    </el-row>
    <div class="cmt-ctrl">
      <a href="javascript:;">回复</a>
    </div>
  </div>
</template>

<script>
export default {
  props: ['data'],
  mounted() {
    console.log(this.data.content);
  }
};
</script>
<style lang="less" scoped>
.cmt-floor {
  background: #f9f9f9;
  border: 1px solid #ddd;
  padding: 5px 10px;
  .cmt-content {
    // padding: 5px 10px 0;
    .cmt-info {
      font-size: 12px;
      color: #666;
      i {
        color: #999;
      }
      span {
        float: right;
      }
    }
  }
  .cmt-message {
    margin-top: 10px;
  }
  .cmt-ctrl {
    height: 20px;
    line-height: 20px;
    font-size: 12px;
    color: #1e50a2;
    text-align: right;
  }
  .cmt-pic {
    width: 80px;
    height: 80px;
    border-radius: 6px;
    overflow: hidden;
    margin-right: 5px;
    margin-top: 10px;
    padding: 5px;
    border: 1px dashed #ddd;

    img {
      display: block;
      width: 100%;
      height: 100%;
      -o-object-fit: cover;
      object-fit: cover;
      cursor: pointer;
    }
  }
}
</style>
